package com.douglas.managesystem.controller;


import com.douglas.managesystem.vo.UserVO;
import org.springframework.beans.factory.annotation.Autowired;

import javax.servlet.http.HttpSession;

/**
 * @Description TODO
 * @Author 以梦为馬 <Douglas1314@126.com>
 * @Version V1.0.0
 * @Date 2020-11-14 14:37
 **/
public class BaseController {

    protected final static Integer TWO = 2;

    @Autowired
    protected HttpSession session;

    protected UserVO getLoginUser(){
        Object obj = session.getAttribute("loginUser");
        if(obj != null){
            return (UserVO)obj;
        }else{
            return null;
        }
    }
}
